package com.medata.utils;

import java.util.Map;

public class DataUtil {
	public static Integer compared(String stime,String ntime){
		stime=stime.replace(" ","");
		stime=stime.replace(":","");
		stime=stime.replace("-", "");
		ntime=ntime.replace("-", "");
		ntime=ntime.replace(" ","");
		ntime=ntime.replace(":","");
		stime=stime.substring(0,8);
		ntime=ntime.substring(0,8);
		int NewStime = Integer.valueOf(stime);
		int NewNtime = Integer.valueOf(ntime);
		return NewStime>NewNtime?1:0;
	}

	public static String getValue(String desc, Map<String,String> valuesMmap){
		for (Map.Entry<String,String> entry:valuesMmap.entrySet()){
			if (entry.getKey().equalsIgnoreCase(desc)){
				return entry.getValue();
			}
		}
		return null;
	}




}
